#!/usr/bin/env python
# -*- encoding: utf-8 -*-

'''
@File    :   tree_lenses.py  
@Version : 1.0  
@Author :   iherr
@Desciption : None
'''
import trees
import tree_plotter

if __name__ == '__main__':
    fr=open('lenses.txt')
    lenses=[inst.strip().split('\t') for inst in fr.readlines()]
    lensesLabels=['age','prescript','astigmatic','tearRate']
    lensesTree=trees.createTree(lenses,lensesLabels)
    print(lensesTree)

    tree_plotter.createPlot(lensesTree)